package com.wuyan.locationdog.adapter

import android.widget.ImageView
import android.widget.TextView
import androidx.annotation.LayoutRes
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.wuyan.locationdog.R
import com.arcsoft.commonbase.bean.ShareTimeBean


class ShareTimeListAdapter(@LayoutRes layoutResId: Int, data: MutableList<ShareTimeBean>?) :
    BaseQuickAdapter<ShareTimeBean, BaseViewHolder>(layoutResId, data) {


    override fun convert(holder: BaseViewHolder, item: ShareTimeBean) {
        holder.apply {
            val imageView = getView<ImageView>(R.id.ivCheck)
            val time = getView<TextView>(R.id.time)
            time.text = item.time

            if (item.isSelect) {
                imageView.setImageResource(R.mipmap.alarm_checked)
            } else {
                imageView.setImageResource(R.mipmap.alarm_unchecked)

            }
        }
    }
}


